﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kokomo.Xml
{
	public class TypeSchemaCollection : List<TypeSchema>
	{
		public TypeSchema FindByType(Type type)
		{
			ArgumentValidation.CheckNullArgument("type", type);

			return this.Find(schema => schema.Type == type);
		}
		public TypeSchema FindByElementName(string elementName)
		{
			ArgumentValidation.CheckNullArgument("elementName", elementName);

			return this.Find(schema => schema.ElementName == elementName);
		}
	}
}
